{% extends 'Base/main.0.html.twig' %}

{% block myJs %}
{% endblock %}
{% block content %}
    <div id="page" class="pad10">
        {% block statistic %}
            {#这里可以放一下统计数据类的东西#}
        {% endblock %}
        <form  lay-filter="mainform" class="layui-form" method="get" action="{{ urls.toolUrl is defined ? urls.toolUrl : '' }}" id="form1">
            {% block actionScript %}
                <div class="aspNetHidden">
                    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
                    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
                </div>
                <script type="text/javascript">
                    var theForm = document.forms['form1'];
                    if (!theForm) {
                        theForm = document.form1;
                    }
                    function __doPostBack(eventTarget, eventArgument) {
                        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                            theForm.__EVENTTARGET.value = eventTarget;
                            theForm.__EVENTARGUMENT.value = eventArgument;
                            theForm.submit();
                        }
                    }
                </script>
            {% endblock %}
            {% block toolbar -%}
                <!--工具栏-->
                <div class="flex-r">
                    <div>
                        <div class="layui-btn-group">
                            {% block addBtn %}<a href="{{ urls.addUrl is defined ? urls.addUrl : '' }}"><div class="layui-btn layui-btn-normal"><span class="fa fa-plus"></span> 新增</div></a>{% endblock %}

                            {% block delBtn %}
                                <div class="layui-btn layui-btn-normal" id="ComListCheckAll"><span class="fa fa-check-square-o"></span> <span class="text">全选</span></div>
                                <div class="layui-btn layui-btn-normal" id="ComListDelete"><span class="fa fa-trash-o"></span> 删除</div>
                            {% endblock %}
                        </div>
                    </div>
                    <div class="flex1">
                        {% block options %}
                        {% endblock %}
                    </div>
                    <div class="flex-r">
                        {% block searchBox %}<input type="text" name="txtKeywords"  value="{{ app.request.get("txtKeywords") }}" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">{% endblock %}
                        <a class="layui-btn layui-btn-normal cf"  href="javascript:__doPostBack('lbtnSearch','')"><span class="fa fa-search cf"></span> </a>
                    </div>
                </div>
                <!--/工具栏-->
            {% endblock %}
            {% block main %}
                <!--列表-->
                <table class="layui-table" lay-skin="line">
                    <thead>
                    {% block tableHead %}
                    {% endblock %}
                    </thead>
                    <tbody>
                    {% block tableList %}
                    {% endblock %}
                    </tbody>
                </table>
                <!--/列表-->
            {% endblock %}
            {% block page %}
                <!--内容底部-->
                <div class="line20"></div>
                {% if page is defined %}
                    <div class="pagelist ">
                        <div class="l-btns layui-inline">
                            <span>显示</span>
                            {{ page.perPage }}
                            <span>条/页</span>

                            <span>共 {{ page.total  }} 条记录</span>
                        </div>
                        <div id="PageContent" class="default flex-r flex-center">
                            <div class="flex1">{{ page.page  | raw  }}</div>
                        </div>
                    </div>
                {% endif %}
                <!--/内容底部-->
            {% endblock %}
        </form>
    </div>

{% endblock %}